<%@ page import="java.sql.*,studentportal.*"%>


<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Student Portal</title>
<meta name="Microsoft Theme" content="indust 011">
</head>

<body background="indtextb.jpg" bgcolor="#FFFFFF" text="#000000" link="#3366CC" vlink="#666666" alink="#996600">

<font face="Trebuchet MS, Arial, Helvetica"><!--mstheme--></font>
	<table border="1" width="100%" bordercolorlight="#666666" bordercolordark="#000000">
		<tr>
				 <td width="100%"><!--mstheme--><font face="Trebuchet MS, Arial, Helvetica">&nbsp;<!--mstheme--></font></td>
		</tr>
	</table>

<font face="Trebuchet MS, Arial, Helvetica">
	<form method="POST" action="">
  
	  <p>
			<table align="center" border="1">
				<tr>
					<th>Course Name</th>
					<th>Branch ID</th>
					<th>Branch Name</th>
					<th>Branch Desc</th>
				</tr>
				<%
					Connection con=MySQLDriver.getConnection(); 
					Statement st=con.createStatement();
					System.out.println("After Statement");
					ResultSet rs=st.executeQuery("select * from branch_master where course_id='"+request.getParameter("cid")+"'");
					while(rs.next())
					{

						String bava=rs.getString(4);
						if(bava.equals("n") || bava.equals("N"))
						{
							System.out.println("In N");
				%>
							<tr>
								<td colspan="4" align="center">In This Course There is No Branches</td>
							</tr>
							<tr>
								<td align="center" colspan="4"><a href="Course_OfferedView_Main.jsp">Back</a></td>
							</tr>
				<%
							break;
						}
						String bid=rs.getString(1);
						String bname=rs.getString(2);

				%>
								
					<tr>
						<td align="center"><%=request.getParameter("cname")%></td>
						<td align="center"><%=bid%></td>
						<td align="center"><a href="<%=bname+".html"%>"><%=bname%></a></td>
						<td align="center"><%=rs.getString(3)%></td>
					</tr>
					<tr>
						<td align="center" colspan="4"><a href="Course_OfferedView_Main.jsp">Back</a></td>
					</tr>
				<%
					
					}
					rs.close();
					st.close();
					con.close();
				%>
	  </p>
	</form>
</font>

</body>

</html>
